<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" id="html">
    <head>
        <title></title>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <base href="<?= base_url(1); ?>" />
        <link type="text/css" href="css/main.css?v=<?= $config['version'] ?>" rel="stylesheet" />
        <script src="js/time.js?"></script>
    </head>
    <body >
        <?php include(VIEWPATH . 'common/main_header.php'); ?>
        <?php //print_r($xishu); ?>
        <form action="" method="POST" id="rowForm">
            <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tablegrid tableedit">
            	<tr><td><?= translate('ACTIVITY_MODULE_MODULENAME') ?>:</td><td><?=$row['modulename'] ?></td></tr>  
            	<tr><td><?= translate('ACTIVITY_MODULE_TABLENAME') ?>:</td><td><?=$row['tablename'] ?></td></tr>      	
                <tr><td>&nbsp;</td><td>&nbsp;</td></tr>
                <?php foreach ($xishu as $key => $value) { ?>
                	
	                <tr><td><?= translate('ACTIVITY_WISHPOND_STRATEGYID') ?>:</td>
	                <td><input type='text' name="value[strategyid]" id=<?php echo $key."strategyid"; ?> value="<?=$value['strategyid'] ?>">&nbsp;</td></tr>
	                <tr><td><?= translate('ACTIVITY_WISHPOND_REFRESH') ?>:</td>
	                <td><input type='text' name="value[refresh]" id=<?php echo $key."refresh"; ?> value="<?=$value['refresh'] ?>">&nbsp;</td></tr>
	                <tr><td><?= translate('ACTIVITY_WISHPOND_SPEEDUP') ?>:</td>
	                <td><input type='text' name="value[speedup]" id=<?php echo $key."speedup"; ?> value="<?=$value['speedup'] ?>">&nbsp;</td></tr>
	                <tr><td>&nbsp;</td><td>&nbsp;</td></tr>
                <?php } ?>
                <tr><td>&nbsp;</td>     
                <input type="hidden" vaue="<?= $modulename ?>" name="modulename" />       
                <td><input type="submit" value="<?= translate('SUBMIT') ?>" id="submit"/> 
                <input type="reset" value="<?= translate('RESET') ?>" id="reset"/></td></tr>
            </table>
        </form>
        <script type="text/javascript">
            SG.init("core.form", function() {
                $.formValidator.initConfig({formid: "#rowForm", submitonce: true});
                $("#modulename").formValidator({empty: false, onshow: '<?= translate('C_NOT_EMPTY') ?>'}).inputValidator({min: 1, onerrormin: '<?= translate('C_NOT_EMPTY') ?>'});
                $("#tablename").formValidator({empty: false, onshow: '<?= translate('C_NOT_EMPTY') ?>'}).inputValidator({min: 1, onerrormin: '<?= translate('C_NOT_EMPTY') ?>'});

                <?php foreach ($xishu as $key => $value) { ?>
                	$("#"+<?=$key ?>+"strategyid").formValidator({empty: false, onshow: '<?= translate('C_NOT_EMPTY') ?>'}).inputValidator({min: 1, onerrormin: '<?= translate('C_NOT_EMPTY') ?>'});
                	$("#"+<?=$key ?>+"refresh").formValidator({empty: false, onshow: '<?= translate('C_ONLY_NUM') ?>'}).regexValidator({regexp: 'num', datatype: 'enum', onerror: '<?= translate('C_ONLY_NUM') ?>'});
                	$("#"+<?=$key ?>+"speedup").formValidator({empty: false, onshow: '<?= translate('C_ONLY_NUM') ?>'}).regexValidator({regexp: 'num', datatype: 'enum', onerror: '<?= translate('C_ONLY_NUM') ?>'});
                <?php } ?>
                });
        </script>
    </body>
</html>